﻿using System.ComponentModel.DataAnnotations.Schema;

namespace PioneerBoilerplate.Model.BaseEntity
{
    public interface IEntity<TKey>
    {
        /// <summary>
        /// 主键Id
        /// </summary>       
        TKey Id { get; set; }
    }

    public interface IEntity : IEntity<long>
    {
    }

    public class Entity<TKey> : IEntity<TKey>
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public virtual TKey Id { get; set; }
    }

    public class Entity : Entity<long>
    {
    }
}
